<template id="try_detail">
    <div class="try_m">
        <div class="try_detail_top">
            <img src="../image/blue_da.png" alt="" @click="get_tui()">
            <h4>试吃详情</h4>
        </div>
        <div class="try_detail_ban">
            <img v-bind:src="info.goods_img" alt="">
            <p>#{{info.title}}:{{info.goods_name}}#</p>
        </div>
        <p class="try_detail_1">本期试吃-{{info.goods_name}}</p>
        <p class="try_detail_2">{{info.goods_brief}}</p>
        <p class="try_detail_3">活动时间：{{info.start_time}}-{{info.end_time}}</p>
        <p class="try_detail_4">参与方式：进入商城-首页-会员-新品试吃的，提交免费试吃申请</p>
        <p class="try_detail_5">分享朋友：圈既可以领取会员红包进入商城-首页-会员-新品试吃的，
            提交免费试吃申请进入商城-首页-会员-新品试吃的，提交免费试吃申请</p>
        <p class="try_detail_6">
            <span>在这里可以进行购买哦</span>
        </p>
        <!--新版的试吃商品列表-->
        <div class="try_list_0">
            <div class="try_bu_mmg_0">
                <div class="try_li_st_0">
                    <div class="try_x_m_0"><img class="img_l1"  v-bind:src="goods.thumb" alt="" ></div>
                    <div class="try_x_right_0">
                        <h2 >{{goods.name}}</h2>
                        <p >{{goods.brief}}</p>
                        <div class="try_Select_price_0">
                            <span ><strong>¥{{goods.shop_price}}</strong></span>
                            <span @click="golink(goods.goods_id)">前往购买</span>
                        </div>
                    </div>
                </div>
            </div>
        </div>
<!--评论列表-->
        <div class="try_commodity_4" v-for="(item,index) in data">
            <p class="try_commodity_4_1">{{item.cname}}</p>
            <p class="try_ming_g">2016.11.26 16:98</p>
            <p class="try_commodity_4_3">{{item.content}}</p>
            <div class="try_commodity_4_4"><img :src="item.headimg" alt="" ></div>
            <ul class="try_commodity_4_5">
                <li v-for="(item,index) in item.shopimg"><img :src="item" alt=""></li>
            </ul>
             <p class="try_commodity_4_1" v-if="item.admin_tips">小马回复:{{item.admin_tips}}</p>
        </div>
        <p style="height:1.1rem;"></p>
           <!--底部浮动-->
        <p class="try_float" @click="get_Release()">发布动态</p>
    </div>
</template>

<script>
    export default{
        name: 'Past_members',
        data() {
            return {
                data:[],
                info:[],
                goods:[],
                id:this.$route.query.id,
                images:[],
            }
        },
        mounted:function () {
            let H=$(window).height();
            $('.try_m').height(H);


            //获取往期试吃
            let info  = [];
            info['c'] = 'Member';
            info['m'] = 'trial_act_goods_info';
            info['id']=  this.id;
            this.get_detail_info(info);

            
            //获取评论列表
            
        },
        methods:{
            get_Release:function(){
                this.$router.push('/Release?order_id='+this.info.order_id);
            },
            get_tui:function(){
                window.history.go(-1);
            },
            get_detail_info(data){
                let url  = this.GLOBAL.BaseUrl+'/mobile/api/index.php';
                let Data = this.GLOBAL.dataParam(data);

                this.$ajax.post(url,Data).then((res) => {
                    let temp = res.data;
                    if(temp.code == 200){
                         this.info  = temp.data;
                         this.goods = temp.data.goods_info;

                         let ary  = [];
                         ary['c'] = 'Comment';
                         ary['m'] = 'comment_list';
                         ary['goods_id']=  temp.data.goods_info.goods_id;
                         this.GLOBAL.getApi(this,ary);

                    }else{
                        this.GLOBAL.center_error(this,temp);   

                    }  
                })     
            },
            golink(goods_id){
                if(goods_id){
                    this.$router.push('/shopDetails/commodity?goods_id='+goods_id);
                }
            }
        },

    };

</script>
<style>
    .try_ming_g{
        height:0.38rem;
        line-height:0.38rem;
        color:#b2b2b2;
        font-size:0.2rem;
        text-indent: 0.2rem;
    }
    /*新增加的时间*/
    .try_float{
        height:1rem;
        width:100%;
        line-height:1rem;
        text-align:center;
        color:#ffffff;
        font-size:0.3rem;
        position:fixed;
        bottom:0;
        left:0;
        background: -webkit-linear-gradient(left, #7cceff , #2fb0fc); /* Safari 5.1 - 6.0 */
        background: -o-linear-gradient(right, #7cceff, #2fb0fc); /* Opera 11.1 - 12.0 */
        background: -moz-linear-gradient(right,  #7cceff, #2fb0fc); /* Firefox 3.6 - 15 */
        background: linear-gradient(to right, #7cceff, #2fb0fc); /* 标准的语法（必须放在最后） */
    }
    /*6*/
    .try_commodity_4_5 li img{
        display:block;
        height:1.29rem;
        width:1.29rem;
        border:0.01rem solid red;

    }
    .try_commodity_4_5 li{
        list-style:none;
        height:1.3rem;
        width:1.3rem;
        border-radius:0.05rem;
        margin-right:0.1rem;
    }
    .try_commodity_4_5{
        height:1.56rem;
        width:5.74rem;
        padding-top:0.2rem;
        display:flex;
        padding-left:0.26rem;
        overflow:hidden;
    }
    .try_commodity_4_4{
        border-radius:50%;
        position:absolute;
        top:0;
        left:0.2rem;
        height:0.62rem;
        width:0.62rem;
    }
    .try_commodity_4_4 img{
        display:block;
        height:0.62rem;
        width:0.62rem;
    }
    .try_commodity_4_3{
        min-height:0.46rem;
        line-height:0.46rem;
        color:#4e4e4e;
        font-size:0.24rem;
        padding-left:0.2rem;
    }
    .try_commodity_4_1{
        height:0.62rem;
        line-height:0.62rem;
        color:#4d4d4d;
        font-size:0.2rem;
        padding-left:0.88rem;
        margin-bottom:0.05rem;
    }
    .try_commodity_4{
        width:100%;
        min-height:3.3rem;
        position:relative;
        border-bottom:0.01rem solid #f0f0f0;
    }
    /*4*/
    /*评论列表*/
    .try_detail_6{
        height:0.25rem;
        width:4.84rem;
        margin:auto;

        border-top:0.01rem solid #8c8c8c;

    }

    .try_detail_6 span:nth-of-type(1){
        height:0.25rem;
        width:3rem;
        line-height:0.25rem;
        display:block;
        text-align:center;
        position:absolute;
        color:#8c8c8c;
        font-size:0.24rem;
         background:#ffffff;
        margin-left:0.9rem;
         margin-top:-0.1rem;

    }
    .try_detail_5{
        min-height:0.56rem;
        line-height:0.56rem;
        color:#4b4b4b;
        font-size:0.26rem;
        width:5.7rem;
        padding-left:0.2rem;
        word-wrap:break-word;
        margin-bottom:0.34rem;
    }
    .try_detail_4{
        min-height:0.45rem;
        line-height:0.45rem;
        color:#4b4b4b;
        font-size:0.26rem;
        width:5.7rem;
        padding-left:0.2rem;
        word-wrap:break-word;
        margin-bottom:0.06rem;

    }
    .try_detail_3{
        height:0.6rem;
        line-height:0.6rem;
        color:#4b4b4b;
        font-size:0.26rem;
        text-indent: 0.2rem;
        margin-bottom:0.06rem;
    }
    .try_detail_2{
        height:0.42rem;
        line-height:0.42rem;
        text-indent:0.2rem;
        color:#c0c0c0;
        font-size:0.24rem;
    }
    .try_detail_1{
        height:0.5rem;
        line-height:0.5rem;
        color:#373737;
        font-size:0.24rem;
        text-indent: 0.2rem;
    }
    .try_detail_ban{
        width:100%;
        height:3.2rem;
        position:relative;
        margin-bottom:0.22rem;
    }
    .try_detail_ban img{
        width:100%;
        height:3.2rem;
        display:block;
    }
    .try_detail_ban p{
        height:3.2rem;
        line-height:3.2rem;
        text-align:center;
        color:#ffffff;
        font-size:0.28rem;
        position:absolute;
        top:0;
        left:0;
        width:100%;
    }
/*2*/
    .try_list_0 .try_bu_mmg_0:last-of-type{
        border-bottom:0;
    }
    .try_bu_mmg_0{
        height:1.95rem;
        width:100%;
        border-bottom:0.01rem solid #f0f0f0;
        padding-top:0.34rem;
    }
    .try_li_st_0{
        height:1.95rem;
        width:5.95rem;
        margin:0 auto;
        display:flex;
        /*   flex-wrap: wrap;*/
        justify-content:flex-start;
        /*  border-bottom:0.01rem solid #f0f0f0;*/
    }
    .try_Select_price_0{
        height:0.68rem;
        position:relative;
        top:0;
    }
    .try_Select_price_0 span:nth-of-type(2){
        display:block;
        height:0.42rem;
        width:1.34rem;
        position:absolute;
        color:#ffffff;
        font-size:0.28rem;
        line-height:0.42rem;
        text-align:center;
        border-radius:0.2rem;
        background: -webkit-linear-gradient(left, #7cceff , #2fb0fc); /* Safari 5.1 - 6.0 */
        background: -o-linear-gradient(right, #7cceff, #2fb0fc); /* Opera 11.1 - 12.0 */
        background: -moz-linear-gradient(right,  #7cceff, #2fb0fc); /* Firefox 3.6 - 15 */
        background: linear-gradient(to right, #7cceff, #2fb0fc); /* 标准的语法（必须放在最后） */
        top:0.1rem;
        right:0;

    }
    .try_Select_price_0 span:nth-of-type(1){
        display:block;
        color:#fc1dac;
        font-size:0.18rem;
        width:2rem;
        height:0.68rem;
        line-height:0.68rem;
    }
    .try_Select_price_0 strong{
        font-size:0.24rem;
    }
    /* .try_Select_price img{
         display:block;
         position:absolute;
         top: -0.08rem;
         right:0.2rem;
         height:0.6rem;
         width:0.6rem;
     }*/
    .try_x_m_0{
        /* flex:1;*/
        height:1.95rem;
        width:2.12rem;
    }
    .try_x_m_0 img{
         display:block;
        width:1.66rem;
        height:1.66rem;
        border-radius:0.1rem;
        margin:0 auto;
    }
    .try_x_right_0{
        height:1.75rem;
        width:3.84rem;
        /* flex: 1;*/
        padding-top:0.2rem;
    }
    .try_x_right_0 h2{
        height:0.42rem;
        color:#4a4a4a;
        font-size:0.28rem;
        line-height:0.25rem;
        font-weight:normal;
    }
    .try_x_right_0 p{
        height:0.35rem;
        color:#bababa;
        font-size:0.19rem;
        line-height:0.19rem;
    }
    .try_list_0{
        min-height:2.3rem;
        width:100%;
        border-bottom:0.1rem solid #f5f4f2;
    }
    /*试吃商品列表*/
    .try_detail_top{
        height:0.75rem;
        width:100%;
       /* border-bottom:1px solid #f0f0f0;*/
        position:relative;
        background:#ffffff;
    }
    .try_detail_top img{
        height:0.36rem;
        width:0.36rem;
        display:block;
        position:absolute;
        left:0.25rem;
        top:0.2rem;
    }
    .try_detail_top h4{
        height:0.75rem;
        color:#2eaffc;
        font-size:0.3rem;
        line-height:0.74rem;
        text-align:center;
        font-weight:normal;
    }
</style>
